import React from 'react';
import { Route, Link } from 'react-router-dom'; 
import { Demo } from './Demo';

export class RouterRedux extends React.Component {
    render() {
        const { match } = this.props;
        return (
            <div>
                <h2>路由匹配</h2>
                <ul>
                    <li><Link to={`${match.path}/demo/demo`}>demo</Link></li>
                    <li><Link to={`${match.path}/demo/demo2`}>demo2</Link></li>
                </ul>
                <Route path={`${match.path}/demo/:id`} component={Demo} />
            </div>
        )
        
    }
}